<?php
/**
 * User
 * Represents a user from the database.
 */
class User
{
	// Private membervariables.
	private $userID;
	private $username;
	private $password;
	private $email;
	
	/**
	 * Creates a instance of a user from the database.
	 *
	 * @param int $userId The userID from the database table 'users'.
	 * @param string $username The username from the database.
	 * @param string $password The password (Sha-1-encrypted) from the database. (Used to change password)
	 * @param string $email The registred e-mail for the user.
	 */
	public function __construct( $userId, $username, $password, $email )
	{
		$this->userID = $userId;
		$this->username = $username;
		$this->password = $password;
		$this->email = $email;
	}
	
	/**
	 * @return int The userID.
	 */
	public function GetUserId()
	{
		return $this->userID;
	}
	
	/**
	 * @return string The username.
	 */
	public function GetUsername()
	{
		return $this->username;
	}
	
	/**
	 * @return string The password (SHA1-encrypted).
	 */
	public function GetPassword()
	{
		return $this->password;
	}
	
	/**
	 * @return string The Email.
	 */
	public function GetEmail()
	{
		return $this->email;
	}
}